package com.ad_hccm.dao.Appendix;

import com.ad_hccm.domain.Appendix.AEDate;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * TODO 不良事件(AE)报告表日期
 */
@Mapper
public interface AEDateDao {
    @Insert("insert into ae_date value(#{id}, #{week}, #{isExit}, #{date})")
    public boolean save(AEDate domain);

    @Update("update ae_date set AEid = #{AEid}, date = #{date} where id=#{id} and week = #{week}")
    public boolean update(AEDate domain);

    @Select("select * from ae_date where id=#{id}")
    public AEDate getById(String id);

    @Select("select * from ae_date")
    public List<AEDate> getAll();
}